﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Register.aspx.cs" Inherits="Demo.Register" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link href="Content/bootstrap.css" rel="stylesheet" />
    <style>
        .row-self {
            width: 550px;
            margin: 50px auto;
        }

        .form-group {
            margin-bottom: 20px !important;
        }

        .title {
            height: 100px;
            display: flex;
            justify-content: center;
            align-content: center;
            font-weight: bold;
            font-size: 40px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div class="container">
            <div class="row row-self form-horizontal">
                <lengend class="title">注册用户</lengend>
                <div class="form-group">
                    <label for="inputEmail3" class="col-sm-2 control-label">用户名</label>
                    <div class="col-sm-10">
                        <asp:TextBox ID="txtUserName" runat="server" CssClass="form-control"></asp:TextBox>
                        <asp:RequiredFieldValidator ControlToValidate="txtUserName" runat="server" ID="ReUserName" ErrorMessage="用户名必填" ForeColor="Red"></asp:RequiredFieldValidator>
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label">密码</label>
                    <div class="col-sm-10">
                        <asp:TextBox ID="txtPwd" runat="server" CssClass="form-control" TextMode="Password"></asp:TextBox>
                        <asp:RequiredFieldValidator ControlToValidate="txtPwd" runat="server" ID="RetxtPwd" ErrorMessage="密码必填" ForeColor="Red"></asp:RequiredFieldValidator>
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label ">确认密码</label>
                    <div class="col-sm-10">
                        <asp:TextBox ID="CertainPwd" runat="server" CssClass="form-control" TextMode="Password"></asp:TextBox>
                        <asp:RequiredFieldValidator ControlToValidate="CertainPwd" runat="server" ID="ReCertainPwd" ErrorMessage="确认密码必填" ForeColor="Red"></asp:RequiredFieldValidator>
                        <asp:CompareValidator runat="server" ID="CmCertainPwd" ControlToCompare="txtPwd" ControlToValidate="CertainPwd" ErrorMessage="两次密码输入不一致" ForeColor="Red"></asp:CompareValidator>
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label">真实姓名</label>
                    <div class="col-sm-10">
                        <asp:TextBox ID="txtTrueName" runat="server" CssClass="form-control"></asp:TextBox>
                        <asp:RequiredFieldValidator ControlToValidate="txtTrueName" runat="server" ID="ReTrueName" ErrorMessage="真实姓名必填" ForeColor="Red"></asp:RequiredFieldValidator>
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label">地址</label>
                    <div class="col-sm-10">
                        <asp:TextBox ID="txtAddress" runat="server" CssClass="form-control"></asp:TextBox>
                        <asp:RequiredFieldValidator ControlToValidate="txtTrueName" runat="server" ID="ReAddress" ErrorMessage="真实地址必填" ForeColor="Red"></asp:RequiredFieldValidator>

                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10  text-center">
                        <asp:Button runat="server" ID="btnReg" Text="注册" OnClick="btnReg_Click" CssClass="btn btn-default" />
                    </div>
                </div>
            </div>
        </div>
    </form>
    <script>
        window.onload = function () {
            setInterval(function () {
                if (<%= status %>) {
                    location = "Login.aspx"
                }
            }, 1000);
        }
    </script>
</body>
</html>
